/*
 * Copyright (c) 2015. For Intelligent Group.
 */

package com.intelligent.ispc.core.service;

import com.intelligent.ispc.core.dto.TestFileDto;
import com.intelligent.ispc.utils.TestFileStatus;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * Created by Julia.Zhou on 2016/03/12.
 */
public interface TestFileService {

    /**
     * save test file history.
     *
     * @param testFileDto
     */
    Long saveTestFile(TestFileDto testFileDto);

    /**
     * update test file status.
     *
     * @param uuid
     * @param status
     */
    void updateTestFileStatus(String uuid, TestFileStatus status);

    /**
     * Searching import data file history.
     *
     * @param searchParams
     * @param pageable
     */
    Page<TestFileDto> searchTestFile(Map<String, Object> searchParams, Pageable pageable);

    /**
     * Delete the test file with uuid.
     *
     * @param uuid
     */
    void deleteTestFile(String uuid);

    /**
     * Delete the test file with uuid.
     *
     * @param uuid
     */
    void destroyTestFileAndTestItemName(String uuid);

    /**
     * logic delete the test file with uuid.
     *
     * @param uuid
     */
    void logicDeleteTestFile(String uuid);

    /**
     * Restore the test file with uuid.
     *
     * @param uuid
     */
    void restoreTestFile(String uuid);

    /**
     * check the test file with originalName.
     *
     * @param originalName
     * @param projectId
     */
    boolean checkTestFile(List<String> originalName, String projectId);

    /**
     * set the test item name.
     *
     * @param projectId
     * @param fileId
     * @param isLogicDelete
     * @param isDelete
     */
    void setTestItemName(String projectId, String fileId, boolean isLogicDelete, boolean isDelete);
}
